import { request } from '@/utils/request'
// 加入购物车
export const addCart = (goodsId, quantity) =>
  request('Membercart/cart_add', {
    goods_id: goodsId,
    quantity: quantity,
    client_type: 'wap'
  })
// 编辑购物车
export const editCart = (cartId, quantity) =>
  request('Membercart/cart_edit_quantity', {
    cart_id: cartId,
    quantity: quantity,
    client_type: 'wap'
  })
// 删除购物车
export const delCart = cartId =>
  request('Membercart/cart_del', {
    cart_id: cartId,
    client_type: 'wap'
  })

// 购物车数量
export const cartQuantity = () => request('/Membercart/cart_count')
